package com.event.ingestion.common;

import java.util.Objects;

public class Tuple<A,B> {
    public final A key;
    public final B value;
    public Tuple(A key,B value){
        this.key=key;
        this.value=value;

    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Tuple)) return false;
        Tuple<?, ?> tuple = (Tuple<?, ?>) o;
        return Objects.equals(key, tuple.key) &&
                Objects.equals(value, tuple.value);
    }

    @Override
    public int hashCode() {
        return Objects.hash(key, value);
    }
}
